package com.ityuxin.dao;

import com.ityuxin.domain.Orders;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @Author: yyh
 * @Description:
 * @Date:Create：in 2021/4/3 16:20
 * @Modified By：
 */
public interface ServiceOrderMapper {

    @Select(" select *  from  orders ")
    List<Orders> findAll();

    @Delete("delete from orders where id = #{id} ")
    void deleteById(Integer id);

    @Insert("insert into orders values(null,#{createTime},#{orderName},#{remark},#{station},#{telephone}) ")
    void addserviceitem(Orders order);

    @Update("update orders set createTime=#{createTime},orderName=#{orderName},remark=#{remark},station=#{station},telephone=#{telephone} where id=#{id} ")
    void updateserviceitem(Orders order);

    @Select("select  *  from orders where id = #{id}")
    Orders findById(Integer id);
}
